local function main(userOb, msgData)
    if not msgData.GoodFriendId then
        return
    end    
    local result = {}
    local userId = userOb:query_temp("userId")
    local rpc = {}
    rpc.behavior = "get"
    rpc.condition = string.format(" WHERE from_user='%s' and type = 0", userId)
    rpc.method = "change_task"
    local ok, data = THREAD_D:send("database_yield", rpc) 
    result.data = table.values(data)
    result.code = 200
    result.status = "success"

    userOb:send_packet("MSGS2CQueryFriend", result)  
end

--注册方法
COMMAND_D:register_command("MSGC2SQueryFriend",GameCmdType.NONE, main)